package com.xinsoft.controller.wms;

import com.xinsoft.common.Response;
import com.xinsoft.service.ScmInventoryLossOutstockService;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 盘亏出库
 * @folder 云供应链/仓库管理/盘亏出库
 */
@RestController
@RequestMapping("/scm/inventoryLossOutstock")
public class ScmInventoryLossOutstockController {

    @Autowired
    private ScmInventoryLossOutstockService inventoryLossOutstockService;

    /**
     * 审核
     */
    @GetMapping("/audit")
    @Transactional(rollbackFor = Exception.class)
    public Response<?> audit(@ApiParam(value = "盘盈入库单id",required = true) @RequestParam("id") Integer id){
        inventoryLossOutstockService.audit(id);
        return Response.succeed();
    }

}
